<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>forEach</title>
</head>
<body>
    <script>
        let arr=[12,56,87,95,64];
        arr.forEach((item,index) => {
            //alert("第"+index+"个："+item);
            alert(`第${index}个：${item}`);
        });
    </script>
</body>
</html>